package com.csvw.skr.newTask.entity.inspection;

import org.hibernate.annotations.Type;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

/**
 * Created by Administrator on 2016/12/16.
 */
@Entity
@Table(name = "csvw_skr_task_inspection_question")
public class Question {

    /**
     * 点检问卷题目的ID， question_uuid
     */
    @Id
    @Column(name = "pk_id", length = 50)
    private String id;

    /**
     * 点检任务的ID
     */
    @Column(length = 30)
    private String assignmentId;

    /**
     * 点检问卷题目类型
     * 1    选择题
     * 2    多选题
     * 3    简单问答
     * 4    填空题
     * 5    上传照片
     * 6    是非题
     */
    private int type;

    /**
     * 问题的阶段
     */
    @Column(length = 50)
    private String stage;

    /**
     * 询问对象
     */
    @Column(length = 50)
    private String target;

    /**
     * 备注
     */
    private String note;

    /**
     * 题目的标题
     */
    private String title;

    /**
     * 题目的内容
     */
    @Type(type="text")
    private String content;

    /**
     * 数据是否有效
     */
    @Column(nullable=false, columnDefinition="bit default 1")
    private boolean active;

    @Column(name = "xh", columnDefinition="int default 1")
    private int xh;

    /**
     * 数据创建时间
     */

    private Date created;

    /**
     * 数据更新时间
     */
    private Date updated;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAssignmentId() {
        return assignmentId;
    }

    public void setAssignmentId(String assignmentId) {
        this.assignmentId = assignmentId;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public String getStage() {
        return stage;
    }

    public void setStage(String stage) {
        this.stage = stage;
    }

    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public int getXh() {
        return xh;
    }

    public void setXh(int xh) {
        this.xh = xh;
    }
}
